import request from '@/utils/request'

// 提交审批（新方法 - 专用于审批页面提交）
export function submitApproval(data) {
  return request({
    url: '/system/record/submit',
    method: 'post',
    data: data
  })
}

// 查询审批记录列表
export function listApprovalRecord(query) {
  return request({
    url: '/system/record/list',
    method: 'get',
    params: query
  })
}

// 查询审批记录详细
export function getApprovalRecord(id) {
  return request({
    url: '/system/record/' + id,
    method: 'get'
  })
}

// 新增审批记录
export function addApprovalRecord(data) {
  return request({
    url: '/system/record',
    method: 'post',
    data: data
  })
}

// 修改审批记录
export function updateApprovalRecord(data) {
  return request({
    url: '/system/record',
    method: 'put',
    data: data
  })
}

// 删除审批记录
export function delApprovalRecord(id) {
  return request({
    url: '/system/record/' + id,
    method: 'delete'
  })
}

// 获取退住申请详情
export function getCheckoutApplicationDetail(id) {
  return request({
    url: '/system/out_management/business/' + id,
    method: 'get'
  })
}

